package cn.edu.csust.cvs.management.controller;

import cn.edu.csust.cvs.management.common.ApiResult;
import cn.edu.csust.cvs.management.controller.request.UserLoginRequest;
import cn.edu.csust.cvs.management.service.SystemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @Auther: snail
 * @Date: 2021/3/1 00:30
 * @Description: 系统管理控制器
 */
@RestController
@RequestMapping("/cvsm/system")
@Api(tags = "系统管理")
public class SystemController {

    @Autowired
    SystemService systemService;

    @ApiOperation(value = "用户登录", notes = "用户登录")
    @GetMapping("/login")
    public ApiResult<Boolean> pageQuery(@Valid UserLoginRequest request, BindingResult result) {

        return systemService.login(request);
    }

}
